﻿using MongoDB.Bson;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace dreamwork.auth.api.Infrastructure
{
    public interface IRepository<T>
    {
        Task<IEnumerable<T>> GetAllAsync();
        Task<T> GetAsync(Guid id);
        Task<IEnumerable<T>> GetListAsync(Expression<Func<T, bool>> selector);
        Task<T> GetAsync(Expression<Func<T, bool>> selector);
        Task AddAsync(T item);
        Task<bool> RemoveAsync(Guid id);
        Task<bool> UpdateAsync(T model);
        Task<bool> RemoveAllAsync();
    }
}
